package kr.hkit.powerjava.chapter21.submit;

class NotFoundException extends Exception {

	public NotFoundException(String message) {
		super(message);
	}
}

public class NotFoundTest1 {
	public static void main(String[] args) { //처리 
		int [] arr = {1,3,5,7,9};
		int num=9;
		
		try {
			for (int i =0 ; i<arr.length;i++) {
				if (arr[i] != num ) {
					searchArray();
			
				} 
			} 
		} catch (NotFoundException e) {
			
			e.printStackTrace();
		}
	
	}

	public static void searchArray() throws NotFoundException {
		throw new NotFoundException("찾는 수 없다");
	}
}